<template>
  <view class="flex  items-center justify-between ">
    <uni-card title="基础卡片" extra="额外信息">
        <text>会员信息：{{memberStore.profile}}</text>
      </uni-card>
    <button  class="button" type="primary" @tap="saveMenber">会员信息</button>
    <button  class="button" type="primary" @click="clearMenber">清除会员信息</button>
    <button  class="button" type="primary" @click="test">测试拦截</button>

  </view>

</template>

<script setup lang="ts">
  import { ref } from 'vue'
import { useMemberStore } from '@/stores';
const memberStore = useMemberStore()
  let count = ref(1)
  function add() {
   count.value++
  }
  function test() {
    // 这里是测试拦截，会被拦截
    console.log('test')
  }
  function saveMenber() {
    memberStore.setProfile ( {name: '小土', age: 25, sex: '男'})
  }
  function clearMenber() {
    memberStore.clearProfile ()
  }
</script>

<style scoped>

</style>